package com.czr.mapper;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.czr.entity.User;
import com.czr.vo.UserParamVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * Description:
 * Author: czr czr
 * Version: 1.0
 * Create Date Time: 2021/11/22 14:34.
 * Update Date Time:
 */
public interface UserMapper extends BaseMapper<User> {

    // sql + mp
    IPage<Map<String, Object>> selectUserMapsPage(Page page, @Param(Constants.WRAPPER) Wrapper<User> queryWrapper);

    List<Map<String,Object>> findBlogsUsers();

    /**
     * 根据userParamVo查询对应的用户信息
     * @param userParamVo
     * @return List<User>
     */
    List<User> findUsers(UserParamVo userParamVo);


}
